﻿#region Using directives

using System;
using System.Collections.Specialized ;
using System.Runtime.Serialization;
using System.Collections.Generic;
#endregion

namespace MCMLXVII.BackEnd.Services.Common.Messages
{
    [Serializable()]
    [System.Xml.Serialization.XmlType(Namespace = "http://tempuri.org/")]
    public class msgLanguajesListResponse
    {
        private Dictionary<string,string> Languages;

        public msgLanguajesListResponse()
        {
            Languages = new Dictionary<string,string>();
        }

        public void AddLanguage(string LanguageID, string LanguajeName)
        {
            Languages.Add(LanguageID, LanguajeName);
        }

        public Dictionary<string,string> GetLanguages()
        {
            return Languages;
        }

        public string GetLanguageDescrip(string key)
        {
            return Languages[key];
        }

        public string[] GetLanguageKeyLists()
        {
            string[] response = new string[Languages.Keys.Count];
            int i = 0;
            foreach (string s in Languages.Keys)
            {
                response[i] = s;
                i++;
            }
            return response;
        }
       
        public Dictionary<string,string> Contents
        {
            get { return Languages; }
            set { Languages = value;}
        }
    }
}
